package o;

import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.huawei.appgallery.downloadengine.api.SessionDownloadTask;
import java.util.ArrayList;
import java.util.Iterator;

public class bpg implements bkm {
    private String mPkgName;
    private ArrayList<bpf> mSplitTaskList;
    private int mVersionCode;

    @NonNull
    public SessionDownloadTask ˎ() {
        SessionDownloadTask sessionDownloadTask = new SessionDownloadTask();
        sessionDownloadTask.ˋॱ(9);
        sessionDownloadTask.ˋ(5);
        sessionDownloadTask.ॱˊ(1);
        sessionDownloadTask.ॱॱ(bla.ˎ(ContentManager.getInstant().getContext(), this.mPkgName));
        sessionDownloadTask.ʼ(this.mPkgName);
        sessionDownloadTask.ʻ(this.mVersionCode);
        if (this.mSplitTaskList != null) {
            Iterator it = this.mSplitTaskList.iterator();
            while (it.hasNext()) {
                sessionDownloadTask.ˏ(((bpf) it.next()).ˎ());
            }
        }
        return sessionDownloadTask;
    }

    public bpg ˏ(String str) {
        if (!TextUtils.isEmpty(str)) {
            this.mPkgName = str;
        }
        return this;
    }

    public bpg ˊ(int i) {
        this.mVersionCode = i;
        return this;
    }

    public bpg ˋ(bpf o_bpf) {
        if (this.mSplitTaskList == null) {
            this.mSplitTaskList = new ArrayList();
        }
        if (o_bpf != null) {
            this.mSplitTaskList.add(o_bpf);
        }
        return this;
    }
}
